﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace data.Entitys
{
    /// <summary>
    /// 用户表
    /// </summary>
    // [Index(nameof(UserName))] //增加非聚集索引
    public class SysUser:BaseModel
    {

        [Comment("用户名"),MaxLength(20)]
        public string UserName { get; set; }
        [Comment("密码"), MaxLength(30)]
        public string PassWord { get; set; }
        /*
        //设置外键 
        public int RoleId { get; set; }
        [ForeignKey("RoleId")]
        public Role Role { get; set; }

        [DefaultValue(true)] //设置默认值
        [Column(TypeName = "decimal(18,4)")] //指定列的数据类型,不同的数据库类型可能略有差异

        */
    }
}
